/*
 *
 * Copyright (c) 2023 - future
 * @author fzh
 * @email e_341877120_mail@163.com
 * @link https://mvnrepository.com/search?q=io.github.xrfzh.cn
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package cn.xrfzh.common.axios;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum AxiosEnum {

	/**
	 * 成功枚举（状态码 + 消息）
	 */
	SUCCESS(10000, "执行成功"), INSERT_SUCCESS(10000, "新增成功"), DELETE_SUCCESS(10000, "删除成功"), UPDATE_SUCCESS(10000,
			"更新成功"), SELECT_SUCCESS(10000, "查询成功"), REGISTER_SUCCESS(10000, "注册成功"), LOGIN_SUCCESS(10000,
					"登录成功"), IMPORT_SUCCESS(10000, "文件导入成功"), EXPORT_SUCCESS(10000,
							"文件导出成功"), UPLOAD_SUCCESS(10000, "文件上传成功"), DOWNLOAD_SUCCESS(10000, "文件下载成功"),

	/**
	 * 失败枚举（状态码 + 消息）
	 */
	ERROR(50000, "执行失败"), UNKNOWN_ERROR(50000, "服务器异常"), INSERT_ERROR(50001, "新增失败"), DELETE_ERROR(50002,
			"删除失败"), UPDATE_ERROR(50003, "更新失败"), SELECT_ERROR(50004, "查询失败"), REGISTER_ERROR(50005,
					"注册失败，用户名已存在"), LOGIN_ERROR(50006, "登录失败，用户名与密码不匹配"), ACCOUNT_ERROR(50007,
							"账号已被禁用，请联系管理员"), PERMISSION_ERROR(50008, "访问权限不足"), REMOTE_ERROR(50009,
									"远程调用失败"), NULL_POINTER_ERROR(50010, "发生空指针异常"), UNIQUE_ERROR(50011,
											"新增失败，字段值不能重复"), PARAMETER_ERROR(50012, "参数错误"), IMPORT_ERROR(50013,
													"文件导入失败"), DOWNLOAD_ERROR(50014, "文件下载失败"), FILE_REMOVE_ERROR(50015,
															"文件删除失败"), SLICE_TASK_NOT_EXISTS(50016,
																	"分片任务不存在"), PLEASE_TRY_UPLOAD_AGAIN(50017,
																			"分片缺失，请重新上传");

	private final Integer code;

	private final String msg;

}
